<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
 <head><title>Markup (Markup)</title><meta charset="utf-8"/>
  <link rel="stylesheet" href="odoc.css"/>
  <meta name="generator" content="odoc 2.4.1"/>
  <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
  <script src="highlight.pack.js"></script>
  <script>hljs.initHighlightingOnLoad();</script>
  <link rel="stylesheet" href="katex.min.css"/>
  <script src="katex.min.js"></script>
  <script>
   
//<![CDATA[

          document.addEventListener("DOMContentLoaded", function () {
            var elements = Array.from(document.getElementsByClassName("odoc-katex-math"));
            for (var i = 0; i < elements.length; i++) {
              var el = elements[i];
              var content = el.textContent;
              var new_el = document.createElement("span");
              new_el.setAttribute("class", "odoc-katex-math-rendered");
              var display = el.classList.contains("display");
              katex.render(content, new_el, { throwOnError: false, displayMode: display });
              el.replaceWith(new_el);
            }
          });
        
//]]>

  </script>
 </head>
 <body class="odoc">
  <header class="odoc-preamble">
   <h1>Module <code><span>Markup</span></code></h1>
   <p>Here, we test the rendering of comment markup.</p>
  </header>
  <nav class="odoc-toc">
   <ul>
    <li><a href="#sections">Sections</a>
     <ul>
      <li><a href="#subsection-headings">Subsection headings</a>
       <ul>
        <li><a href="#sub-subsection-headings">Sub-subsection headings</a>
        </li>
        <li><a href="#anchors">Anchors</a>
         <ul>
          <li><a href="#paragraph">Paragraph</a>
           <ul><li><a href="#subparagraph">Subparagraph</a></li></ul>
          </li>
         </ul>
        </li>
       </ul>
      </li>
     </ul>
    </li><li><a href="#styling">Styling</a></li>
    <li><a href="#links-and-references">Links and references</a></li>
    <li><a href="#preformatted-text">Preformatted text</a></li>
    <li><a href="#lists">Lists</a></li>
    <li><a href="#unicode">Unicode</a></li>
    <li><a href="#raw-html">Raw HTML</a></li>
    <li><a href="#math">Math</a></li><li><a href="#modules">Modules</a></li>
    <li><a href="#tables">Tables</a></li><li><a href="#tags">Tags</a></li>
   </ul>
  </nav>
  <div class="odoc-content">
   <h2 id="sections"><a href="#sections" class="anchor"></a>Sections</h2>
   <p>Let's get these done first, because sections will be used to break
     up the rest of this test.
   </p><p>Besides the section heading above, there are also</p>
   <h3 id="subsection-headings">
    <a href="#subsection-headings" class="anchor"></a>Subsection headings
   </h3><p>and</p>
   <h4 id="sub-subsection-headings">
    <a href="#sub-subsection-headings" class="anchor"></a>Sub-subsection
     headings
   </h4>
   <p>but odoc has banned deeper headings. There are also title headings,
     but they are only allowed in mld files.
   </p><h4 id="anchors"><a href="#anchors" class="anchor"></a>Anchors</h4>
   <p>Sections can have attached 
    <a href="#anchors" title="anchors">Anchors</a>, and it is possible
     to <a href="#anchors" title="anchors">link</a> to them. Links to
     section headers should not be set in source code style.
   </p>
   <h5 id="paragraph"><a href="#paragraph" class="anchor"></a>Paragraph</h5>
   <p>Individual paragraphs can have a heading.</p>
   <h6 id="subparagraph"><a href="#subparagraph" class="anchor"></a>
    Subparagraph
   </h6>
   <p>Parts of a longer paragraph that can be considered alone can also
     have headings.
   </p><h2 id="styling"><a href="#styling" class="anchor"></a>Styling</h2>
   <p>This paragraph has some styled elements: <b>bold</b> and <i>italic</i>
    , <b><i>bold italic</i></b>, <em>emphasis</em>, 
    <em><em class="odd">emphasis</em> within emphasis</em>, 
    <b><i>bold italic</i></b>, super<sup>script</sup>, sub<sub>script</sub>
    . The line spacing should be enough for superscripts and subscripts
     not to look odd.
   </p>
   <p>Note: 
    <i>In italics <em>emphasis</em> is rendered as normal text while 
     <em>emphasis <em class="odd">in</em> emphasis</em> is rendered in
      italics.
    </i> 
    <i>It also work the same in 
     <a href="#">links in italics with 
      <em>emphasis <em class="odd">in</em> emphasis</em>.
     </a>
    </i>
   </p>
   <p><code>code</code> is a different kind of markup that doesn't allow
     nested markup.
   </p>
   <p>It's possible for two markup elements to appear <b>next</b> <i>to</i>
     each other and have a space, and appear <b>next</b><i>to</i> each
     other with no space. It doesn't matter <b>how</b> <i>much</i> space
     it was in the source: in this sentence, it was two space characters.
     And in this one, there is <b>a</b> <i>newline</i>.
   </p>
   <p>This is also true between <em>non-</em><code>code</code> markup
     <em>and</em> <code>code</code>.
   </p>
   <p>Code can appear <b>inside <code>other</code> markup</b>. Its display
     shouldn't be affected.
   </p>
   <h2 id="links-and-references">
    <a href="#links-and-references" class="anchor"></a>Links and references
   </h2>
   <p>This is a <a href="#">link</a>. It sends you to the top of this
     page. Links can have markup inside them: <a href="#"><b>bold</b></a>
    , <a href="#"><i>italics</i></a>, <a href="#"><em>emphasis</em></a>
    , <a href="#">super<sup>script</sup></a>, 
    <a href="#">sub<sub>script</sub></a>, and 
    <a href="#"><code>code</code></a>. Links can also be nested 
    <em><a href="#">inside</a></em> markup. Links cannot be nested inside
     each other. This link has no replacement text: <a href="#">#</a>
    . The text is filled in by odoc. This is a shorthand link: 
    <a href="#">#</a>. The text is also filled in by odoc in this case.
   </p>
   <p>This is a reference to <a href="#val-foo"><code>foo</code></a>.
     References can have replacement text: 
    <a href="#val-foo" title="foo">the value foo</a>. Except for the 
    special lookup support, references are pretty much just like links.
     The replacement text can have nested styles: 
    <a href="#val-foo" title="foo"><b>bold</b></a>, 
    <a href="#val-foo" title="foo"><i>italic</i></a>, 
    <a href="#val-foo" title="foo"><em>emphasis</em></a>, 
    <a href="#val-foo" title="foo">super<sup>script</sup></a>, 
    <a href="#val-foo" title="foo">sub<sub>script</sub></a>, and 
    <a href="#val-foo" title="foo"><code>code</code></a>. It's also possible
     to surround a reference in a style: 
    <b><a href="#val-foo"><code>foo</code></a></b>. References can't 
    be nested inside references, and links and references can't be nested
     inside each other.
   </p>
   <h2 id="preformatted-text">
    <a href="#preformatted-text" class="anchor"></a>Preformatted text
   </h2><p>This is a code block:</p>
   <pre class="language-ocaml">
    <code>
     let foo = ()
     (** There are some nested comments in here, but an unpaired comment
         terminator would terminate the whole doc surrounding comment. It's
         best to keep code blocks no wider than 72 characters. *)
     
     let bar =
       ignore foo
    </code>
   </pre><p>There are also verbatim blocks:</p>
   <pre>The main difference is these don't get syntax highlighting.</pre>
   <h2 id="lists"><a href="#lists" class="anchor"></a>Lists</h2>
   <ul><li>This is a</li><li>shorthand bulleted list,</li>
    <li>and the paragraphs in each list item support <em>styling</em>.</li>
   </ul><ol><li>This is a</li><li>shorthand numbered list.</li></ol>
   <ul>
    <li>Shorthand list items can span multiple lines, however trying 
     to put two paragraphs into a shorthand list item using a double 
     line break
    </li>
   </ul><p>just creates a paragraph outside the list.</p>
   <ul><li>Similarly, inserting a blank line between two list items</li></ul>
   <ul><li>creates two separate lists.</li></ul>
   <ul>
    <li><p>To get around this limitation, one</p>
     <p>can use explicitly-delimited lists.</p>
    </li><li>This one is bulleted,</li>
   </ul><ol><li>but there is also the numbered variant.</li></ol>
   <ul>
    <li>
     <ul><li>lists</li><li>can be nested</li>
      <li>and can include references</li>
      <li><a href="#val-foo"><code>foo</code></a></li>
     </ul>
    </li>
   </ul><h2 id="unicode"><a href="#unicode" class="anchor"></a>Unicode</h2>
   <p>The parser supports any ASCII-compatible encoding, in particuλar
     UTF-8.
   </p><h2 id="raw-html"><a href="#raw-html" class="anchor"></a>Raw HTML</h2>
   <p>Raw HTML can be <input type="text" placeholder="inserted"> as inline
     elements into sentences.
   </p>
   
    <blockquote>
      If the raw HTML is the only thing in a paragraph, it is treated as a block
      element, and won't be wrapped in paragraph tags by the HTML generator.
    </blockquote>
    
   <h2 id="math"><a href="#math" class="anchor"></a>Math</h2>
   <p>Math elements can be inline: 
    <code class="odoc-katex-math">\int_{-\infty}^\infty</code>, or blocks:
   </p>
   <div>
    <pre class="odoc-katex-math display">
         % \f is defined as #1f(#2) using the macro
         \newcommand{\f}[2]{#1f(#2)}
         \f\relax{x} = \int_{-\infty}^\infty
         \f\hat\xi\,e^{2 \pi i \xi x}
         \,d\xi
         
    </pre>
   </div><h2 id="modules"><a href="#modules" class="anchor"></a>Modules</h2>
   <ul class="modules"><li><a href="Markup-X.html"><code>X</code></a> </li>
   </ul>
   <ul class="modules"><li><a href="Markup-X.html"><code>X</code></a> </li>
    <li><a href="Markup-Y.html"><code>Y</code></a> </li>
   </ul><h2 id="tables"><a href="#tables" class="anchor"></a>Tables</h2>
   <table class="odoc-table">
    <tr><th style="text-align:left"><p>Left</p></th>
     <th style="text-align:center"><p>Center</p></th>
     <th style="text-align:right"><p>Right</p></th><th><p>Default</p></th>
    </tr>
    <tr><td style="text-align:left"><p>A</p></td>
     <td style="text-align:center"><p>B</p></td>
     <td style="text-align:right"><p>C</p></td><td><p>D</p></td>
    </tr>
   </table>
   <table class="odoc-table">
    <tr><th style="text-align:left"><p>Left</p></th>
     <th style="text-align:center"><p>Center</p></th>
     <th style="text-align:right"><p>Right</p></th><th><p>Default</p></th>
    </tr>
    <tr><td style="text-align:left"><p>A</p></td>
     <td style="text-align:center"><p>B</p></td>
     <td style="text-align:right"><p>C</p></td><td><p>D</p></td>
    </tr>
    <tr>
     <td style="text-align:left">
      <p>A much longer paragraph which will need to be wrapped and more
        content and more content and some different content and we will
        see what is does if we can see it
      </p>
     </td>
     <td style="text-align:center">
      <p>B much longer paragraph which will need to be wrapped and more
        content and more content and some different content and we will
        see what is does if we can see it
      </p>
     </td>
     <td style="text-align:right">
      <p>C much longer paragraph which will need to be wrapped and more
        content and more content and some different content and we will
        see what is does if we can see it
      </p>
     </td>
     <td>
      <p>D much longer paragraph which will need to be wrapped and more
        content and more content and some different content and we will
        see what is does if we can see it
      </p>
     </td>
    </tr>
   </table>
   <table class="odoc-table">
    <tr><td><p>No</p></td><td><p>Header</p></td></tr>
    <tr><td><p>A</p></td><td><p>B</p></td></tr>
   </table>
   <table class="odoc-table">
    <tr><th><p>Header 1</p></th><th><p>Header 2</p></th></tr>
    <tr><td><p>Data 1</p></td><td><p>Data 2</p></td></tr>
   </table>
   <table class="odoc-table">
    <tr><th><p>Header 1</p></th><td><p>Data 1</p></td></tr>
    <tr><th><p>Header 2</p></th><td><p>Data 2</p></td></tr>
   </table><h2 id="tags"><a href="#tags" class="anchor"></a>Tags</h2>
   <p>Each comment can end with zero or more tags. Here are some examples:
   </p>
   <ul class="at-tags">
    <li class="author"><span class="at-tag">author</span> antron</li>
   </ul>
   <ul class="at-tags">
    <li class="deprecated"><span class="at-tag">deprecated</span> 
     <p>a <em>long</em> time ago</p>
    </li>
   </ul>
   <ul class="at-tags">
    <li class="parameter"><span class="at-tag">parameter</span> 
     <span class="value">foo</span> <p>unused</p>
    </li>
   </ul>
   <ul class="at-tags">
    <li class="raises"><span class="at-tag">raises</span> 
     <code>Failure</code> <p>always</p>
    </li>
   </ul>
   <ul class="at-tags">
    <li class="returns"><span class="at-tag">returns</span> <p>never</p></li>
   </ul>
   <ul class="at-tags">
    <li class="see"><span class="at-tag">see</span> 
     <a href="#" class="value">#</a> <p>this url</p>
    </li>
   </ul>
   <ul class="at-tags">
    <li class="see"><span class="at-tag">see</span> 
     <code class="value">foo.ml</code> <p>this file</p>
    </li>
   </ul>
   <ul class="at-tags">
    <li class="see"><span class="at-tag">see</span> 
     <span class="value">Foo</span> <p>this document</p>
    </li>
   </ul>
   <ul class="at-tags">
    <li class="since"><span class="at-tag">since</span> 0</li>
   </ul>
   <ul class="at-tags">
    <li class="before"><span class="at-tag">before</span> 
     <span class="value">1.0</span> 
     <p>it was in b<sup>e</sup>t<sub>a</sub></p>
    </li>
   </ul>
   <ul class="at-tags">
    <li class="version"><span class="at-tag">version</span> -1</li>
   </ul>
   <div class="odoc-spec">
    <div class="spec value anchored" id="val-foo">
     <a href="#val-foo" class="anchor"></a>
     <code><span><span class="keyword">val</span> foo : unit</span></code>
    </div>
    <div class="spec-doc">
     <p>Comments in structure items <b>support</b> <em>markup</em>, t
      <sup>o</sup><sub>o</sub>.
     </p>
    </div>
   </div><p>Some modules to support references.</p>
   <div class="odoc-spec">
    <div class="spec module anchored" id="module-X">
     <a href="#module-X" class="anchor"></a>
     <code>
      <span><span class="keyword">module</span> <a href="Markup-X.html">X</a>
      </span>
      <span> : <span class="keyword">sig</span> ... 
       <span class="keyword">end</span>
      </span>
     </code>
    </div>
   </div>
   <div class="odoc-spec">
    <div class="spec module anchored" id="module-Y">
     <a href="#module-Y" class="anchor"></a>
     <code>
      <span><span class="keyword">module</span> <a href="Markup-Y.html">Y</a>
      </span>
      <span> : <span class="keyword">sig</span> ... 
       <span class="keyword">end</span>
      </span>
     </code>
    </div>
   </div>
  </div>
 </body>
</html>
